package com.java1412.service;

import com.alibaba.dubbo.config.annotation.Reference;
import com.java1412.entity.UserAddress;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @author java1412
 * @create 2021-07-06 14:44
 */
@Service
public class OrderService {

    @Reference // 使用dubbo提供的reference注解引用远程服务
    private UserService userService;

    /**
     * 初始化订单，查询用户的所有地址并返回
     *
     * @param userId
     * @return
     */
    public List<UserAddress> initOrder(String userId) {
        return userService.getUserAddressList(userId);
    }
}
